package com.anjiebang.mvc.app.service;

import com.anjiebang.mvc.app.mapper.AppDemoMapper;
import com.anjiebang.mvc.base.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Judge
 * @date 2018/5/2.
 */
@Service
public class AppDemoService extends BaseService{



    @Autowired
    private AppDemoMapper appDemoMapper;

    /**
     * 新增
     */
    public void insert(String name){
        appDemoMapper.insert(name);
    }

    /**
     * 修改
     * @param id
     * @param name
     */
    public void update(Integer id,String name){
        appDemoMapper.update(id,name);
    }

    /**
     * 修改
     * @param id
     */
    public void delete(Integer id){
        appDemoMapper.delete(id);
    }

    public List<String> select(){
        return appDemoMapper.select();
    }
}
